package com.ht.service;

import com.ht.bean.*;
import org.apache.ibatis.annotations.*;

import javax.jnlp.IntegrationService;
import java.util.List;
import java.util.Map;

//学生表 Student
public interface StudentService {

    List<Student> stulist();
    List<Studentclass> sclist();
    List<Studenthuor> shlist();
    List<Major> mlist();

    //查询学生表
    List<Map> allstu(int startIndex, int pageSize, Student student);

    //查询总行数
    int countStudent(Student student);

    //删除学生
    boolean delstu(Integer stuId);

    //新增学生
    boolean insestu(Student student);

    //根据id查信息
    Student updstubyid(Integer stuId);

    //修改学生
    boolean updstu(Student student);
//班级表--------------------------------------------------------------------------------------------
    /**
    * 查询班级表
    * @return
    * @param
    * */
    List<Map> classlist(Integer startIndex, Integer pageSize,Studentclass Studentclass);
    /**
     * 查询总行数
     * @return
     *
     * */
    int countclass(Studentclass studentclass);
    /**
     * 查询班级类型表
     * @return
     *
     * **/
    List<Classtype> ctypelist();
    /**
     * 查询届别表
     * @return
     *
     * **/
    List<Studentfall> sfalllist();
    /**
     * 查询系别表
     * @return
     *
     * **/
    List<Dept> deptlist();
    /**
     * 查询专业表
     * @return
     *
     * **/
    List<Major> majorlist();
    /**
     * 查询员工表
     * @return
     *
     * **/
    List<Emp> emplist();
    /**
     * 查询班级教师表
     * @return
     *
     * **/
    List<Classteacher> ctlist();
    /**
     * 查询学期表
     * @return
     * */
    List<Term> tlist();
    /**
     * 查询课程表
     * @return
     * */
    List<Course> clist();
    /**
     * 新增班级
     * @return
     * @param
     * */
    boolean classadd(Studentclass studentclass);
    /**
     * 删除班级
     * @return
     * @param
     * */
    boolean classdel(String classId);
    /**
     * 根据id查班级
     * @return
     * @param
     * */
    Studentclass classbyid(String classId);
    /**
     * 修改班级
     * @return
     * @param
     * */
    boolean classupd(Studentclass studentclass);
    /**
     * 查询成绩表
     * @return
     * */
    List<Map> stuscorelist(Integer startIndex, Integer pageSize,Student student,Course course);
    /**
     * 查询成绩表总行数
     * @return
     * */
    int countstuscore(Student student,Course course);
    /**
     * 新增学生成绩
     * @return
     * */
    boolean addstuscore(Studentscore studentscore);
    /**
     * 删除学生成绩
     * @return
     * */
    boolean delstuscore(String scoreId);
    /**
     *根据id查学生成绩
     * @return
     * */
    Studentscore stuscorebyid(String scoreId);
    /**
     * 修改学生成绩
     * @retuen
     * */
    boolean updstuscore(Studentscore studentscore);

    //答辩成绩表----------------------------------------------------------------------------------------------

    //查询答辩成绩
    List<Map> stureplyscore(Integer startIndex, Integer pageSize,Student student,Project project);

    //查询总行数
    int countstureplyscore(Student student,Project project);

    //添加答辩成绩
    boolean addstureplyscore(Studentreplyscore studentreplyscore);

    //查询项目表
    List<Project> prolist();

    //删除答辩成绩表
    boolean delstureplyscore(String replyId);

    //根据id查答辩成绩
    Studentreplyscore stursbyid(String replyId);

    //修改答辩成绩
    boolean updstureplyscore(Studentreplyscore studentreplyscore);

    //班级分配------------------------------------------------------

    public List<Studentclass> classlistt();
    //查询班级表
    public List<Studentclass> classlist();

    //届别表
    public List<Studentfall> falllist();

    //询各班学生情况
    public List<Map> yfblist(String classId,Integer startIndex, Integer pageSize);
    public int countyfb(String classId);

    //查询招生表信息
    public List<Enrollment> list123(Integer startIndex, Integer pageSize);
    public List<Enrollment> mentlist();
    public int count123();

    //查询要分班的人
    public List<Enrollment> wfb(Integer [] eid);

    //分班
    boolean classfb(List<Enrollment> estu,Integer clazz);

    //分班之后删除
    boolean deletefb(Integer[] ids);

    //查询课程类别-------------------------------------------------------------------------------------
    public List<Coursetype> lookctype(Integer startIndex, Integer pageSize);

    //总行数
    public int countctype();

    //新增课程类别
    public boolean addctype(Coursetype coursetype);

    //根据id查类别
    public Coursetype ctypebyid(String courseTypeId);

    //修改类别
    public boolean updctype(Coursetype coursetype);

    //删除
    public boolean delctype(String courseTypeId);

    //课程管理-------------------------------------------------------------

    //查询课程类别
    public List<Map> lookcourse(Integer startIndex, Integer pageSize);

    //总行数
    public int countcourse();

    //新增课程类别
    public boolean addcourse(Course course);

    //根据id查类别
    public Course coursebyid(String courseId);

    //修改类别
    public boolean updcourse(Course course);

    //删除
    public boolean delcourse(String courseId);

    //查询类别表
    public List<Coursetype> coursetypelist();

    //试讲培训------------------------------------------


    //查询试讲表
    public List<Map> looktrial(Integer startIndex, Integer pageSize);

    //总行数
    public int counttrial();

    //新增
    public boolean addtrial(Trial trial);

    //根据id查
    public Trial trialbyid(String trialId);

    //修改
    public boolean updtrial(Trial trial);

    //删除
    public boolean deltrial(String trialId);

    //查询课程表
    public List<Course> courselist();
    public List<Emp> elist();


    //值班管理----------------------------------------------------------------------------------
    //查询
    public List<Map> weeklist(Integer startIndex, Integer pageSize);
    //
    //总行数
    public int countweek();

    //新增
    public boolean addweek(Weekarrange weekarrange);

    //删除
    public boolean delweek(String weekArrangeId);

    //根据id查
    public Weekarrange weekbyid(String weekArrangeId);

    //修改
    public boolean updweek(Weekarrange weekarrange);

//    宿舍管理
    //查询宿舍
    public List<Studenthuor> stuh();
    public List<Map> hlist(Integer startIndex, Integer pageSize);
    public int counth();

    //查询未分宿舍查学生
    public List<Student> studentlist(Integer startIndex,  Integer pageSize);
    public int countstu();

    //查看当前宿舍床位@Select("select sum(s.count) ren,sum(s.numberBeds-s.count) kon from studenthuor s where s.huorId=#{huorId} group by s.huorId having count(s.floorId)>0")
    public int cwhuor(Integer huorId);


    boolean fpstuss(Integer[] ids,Integer huorId);

    //查看当前宿舍人数
    public int cwhuorr(Integer huorId);

    //修改宿舍人数
    boolean upshuse(Integer huorId,int shu);

}
